#include <iostream>
using namespace std;
#define maxn 1001
#define inf 0x1fffffff
int N, M, C;
int map[maxn][maxn];
int f[maxn][maxn];
int mx, my, mxval = -inf, x, y, sum;
int main()
{
    cin >> N >> M >> C;
    ios::sync_with_stdio(false);
    for (int i = 1; i <= N; ++i)
    {
        for (int j = 1; j <= M; ++j)
        {
            cin >> map[i][j];
            f[i][j] = f[i - 1][j] + f[i][j - 1] - f[i - 1][j - 1] + map[i][j];
        }
    }
    for (int i = 1; i + C - 1 <= N; ++i)
    {
        for (int j = 1; j + C - 1 <= M; ++j)
        {
            x = i, y = j, sum = 0;
            sum = f[i + C - 1][j + C - 1] - f[i + C - 1][j - 1] - f[i - 1][j + C - 1] + f[i - 1][j - 1];
            if (mxval < sum)
                mxval = sum, mx = x, my = y;
        }
    }
    cout << mx << " " << my << endl;
    return 0;
}